import React from 'react';
import { Router, Route, Switch } from 'dva/router';
import IndexPage from './routes/IndexPage';
import OrderDetail from './routes/orders/orderDetail/index';
import OrderList from './routes/orders/orderList/index';
import OrderAdd from './routes/orders/orderAdd/index';

function RouterConfig({ history }) {
  return (
    <Router history={history}>
      <Switch>
        <Route path="/" exact component={IndexPage} />
        <Route path="/order/detail" exact component={OrderDetail} />
        <Route path="/order/list" exact component={OrderList} />
        <Route path="/order/add" exact component={OrderAdd} />
        {/*
        <Route path="/order/detail" exact component={OrderDetail} />
        <Route path="/order/list" exact component={OrderList} />*/}
      </Switch>
    </Router>
  );
}

export default RouterConfig;
